home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  4.7 KB  |  174 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Contains:    AppleScript Generic Component Interfaces.
  5. ;
  6. ;    Version:    Technology:    AppleScript 1.1
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  21. __OSAGENERIC__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  25.     include 'Errors.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  30.     include 'AppleEvents.a'
  31.     ENDIF
  32. ;        include 'Types.a'                                            ;
  33. ;        include 'Memory.a'                                            ;
  34. ;            include 'MixedMode.a'                                    ;
  35. ;        include 'OSUtils.a'                                        ;
  36. ;        include 'Events.a'                                            ;
  37. ;            include 'Quickdraw.a'                                    ;
  38. ;                include 'QuickdrawText.a'                            ;
  39. ;        include 'EPPC.a'                                            ;
  40. ;            include 'AppleTalk.a'                                    ;
  41. ;            include 'Files.a'                                        ;
  42. ;            include 'PPCToolbox.a'                                    ;
  43. ;            include 'Processes.a'                                    ;
  44. ;        include 'Notification.a'                                    ;
  45.  
  46.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  47.     include 'OSA.a'
  48.     ENDIF
  49. ;        include 'AEObjects.a'                                        ;
  50. ;        include 'Components.a'                                        ;
  51. ;     NOTE:    This interface defines a "generic scripting component."
  52. ;            The Generic Scripting Component allows automatic dispatch to a
  53. ;            specific scripting component that conforms to the OSA interface.
  54. ;            This component supports OSA, by calling AppleScript or some other 
  55. ;            scripting component.  Additionally it provides access to the default
  56. ;            and the user-prefered scripting component.
  57. ;
  58.  
  59. ; Component version this header file describes 
  60. kGenericComponentVersion        EQU        $0100
  61.  
  62. kGSSSelectGetDefaultScriptingComponent EQU        $1001
  63. kGSSSelectSetDefaultScriptingComponent EQU        $1002
  64. kGSSSelectGetScriptingComponent    EQU        $1003
  65. kGSSSelectGetScriptingComponentFromStored EQU        $1004
  66. kGSSSelectGenericToRealID        EQU        $1005
  67. kGSSSelectRealToGenericID        EQU        $1006
  68. kGSSSelectOutOfRange            EQU        $1007
  69.  
  70. ; typedef OSType             ScriptingComponentSelector
  71. ; typedef OSAID             GenericID
  72. ; get and set the default scripting component 
  73. ;
  74. ; pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  75. ;
  76.     IF ¬ GENERATINGCFM THEN
  77.         Macro
  78.         _OSAGetDefaultScriptingComponent
  79.             dc.w     $2F3C
  80.             dc.w     $0004
  81.             dc.w     $1001
  82.             moveq    #0,d0
  83.             dc.w     $A82A
  84.         EndM
  85.     ELSE
  86.         IMPORT_CFM_FUNCTION    OSAGetDefaultScriptingComponent
  87.     ENDIF
  88.  
  89. ;
  90. ; pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  91. ;
  92.     IF ¬ GENERATINGCFM THEN
  93.         Macro
  94.         _OSASetDefaultScriptingComponent
  95.             dc.w     $2F3C
  96.             dc.w     $0004
  97.             dc.w     $1002
  98.             moveq    #0,d0
  99.             dc.w     $A82A
  100.         EndM
  101.     ELSE
  102.         IMPORT_CFM_FUNCTION    OSASetDefaultScriptingComponent
  103.     ENDIF
  104.  
  105. ; get a scripting component instance from its subtype code 
  106. ;
  107. ; pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  108. ;
  109.     IF ¬ GENERATINGCFM THEN
  110.         Macro
  111.         _OSAGetScriptingComponent
  112.             dc.w     $2F3C
  113.             dc.w     $0008
  114.             dc.w     $1003
  115.             moveq    #0,d0
  116.             dc.w     $A82A
  117.         EndM
  118.     ELSE
  119.         IMPORT_CFM_FUNCTION    OSAGetScriptingComponent
  120.     ENDIF
  121.  
  122. ; get a scripting component selector (subType) from a stored script 
  123. ;
  124. ; pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  125. ;
  126.     IF ¬ GENERATINGCFM THEN
  127.         Macro
  128.         _OSAGetScriptingComponentFromStored
  129.             dc.w     $2F3C
  130.             dc.w     $0008
  131.             dc.w     $1004
  132.             moveq    #0,d0
  133.             dc.w     $A82A
  134.         EndM
  135.     ELSE
  136.         IMPORT_CFM_FUNCTION    OSAGetScriptingComponentFromStored
  137.     ENDIF
  138.  
  139. ; get a real component instance and script id from a generic id 
  140. ;
  141. ; pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  142. ;
  143.     IF ¬ GENERATINGCFM THEN
  144.         Macro
  145.         _OSAGenericToRealID
  146.             dc.w     $2F3C
  147.             dc.w     $0008
  148.             dc.w     $1005
  149.             moveq    #0,d0
  150.             dc.w     $A82A
  151.         EndM
  152.     ELSE
  153.         IMPORT_CFM_FUNCTION    OSAGenericToRealID
  154.     ENDIF
  155.  
  156. ; get a generic id from a real component instance and script id 
  157. ;
  158. ; pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  159. ;
  160.     IF ¬ GENERATINGCFM THEN
  161.         Macro
  162.         _OSARealToGenericID
  163.             dc.w     $2F3C
  164.             dc.w     $0008
  165.             dc.w     $1006
  166.             moveq    #0,d0
  167.             dc.w     $A82A
  168.         EndM
  169.     ELSE
  170.         IMPORT_CFM_FUNCTION    OSARealToGenericID
  171.     ENDIF
  172.  
  173.     ENDIF ; __OSAGENERIC__
  174.